package com.eonmind.common.contract.enums.ai;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum AiVideoStatusEnum {
    PENDING_GENERATION(0, "待生成"),
    GENERATING(1, "生成中"),

    GENERATED_SUCCESSFULLY(2, "生成成功"),
    GENERATED_FAILED(3, "生成失败");

    private final Integer code;
    private final String desc;

    public static AiVideoStatusEnum getByCode(Integer status) {
        for (AiVideoStatusEnum value : values()) {
            if (value.code.equals(status)) {
                return value;
            }
        }
        return null;
    }
}
